/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 26727
 * Date: 2024-01-10
 * Time: 14:46
 */
public class Test {
    public static void main(String[] args) {
        MyArrayList myArrayList = new MyArrayList();
        myArrayList.add(2);
        myArrayList.add(3);
        myArrayList.display();
        myArrayList.add(8);
        myArrayList.display();


        myArrayList.remove(3);
        myArrayList.display();

        try {
            myArrayList.add(1,99);
        }catch (IndexOutOfException e) {
            e.printStackTrace();
        }
        myArrayList.display();

        try {
            myArrayList.get(4);
        }catch (IndexOutOfException e) {
            e.printStackTrace();
        }

    }
}
























